package com.kili.cloud.common.exception;

import com.kili.common.Exception.ErrorCode;
import com.kili.common.Exception.ExceptionType;
import com.kili.common.Exception.KiliBaseException;

/**
 * @description: 业务异常
 * @author: tom.liu
 * @date: 2019/6/20 18:03
 */
public class ExceptionUtils {

    public static final  KiliBaseException getBussinessException(ExceptionType type, String code, String description) {
        CommonErrorCode resultCode = new CommonErrorCode();
        resultCode.setType(type);
        resultCode.setCode(code);
        resultCode.setDescription(description);
        return new KiliBaseException(resultCode, description);
    }

}
